package com.qidian.mes.cal.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.qidian.mes.cal.mapper.CalUserMapper;
import com.qidian.mes.cal.service.CalUserService;
import com.qidian.mes.pojo.cal.CalPlanTeam;
import com.qidian.mes.pojo.cal.CalUser;
import com.qidian.mes.util.pojo.MESResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Author 04冯虹丹
 * @Company 起点编程
 * @Time 2023/11/3 18:50
 * @Description
 */
@Service
@Transactional
public class CalUserServiceImpl implements CalUserService {

    @Autowired
    private CalUserMapper calUserMapper;
    @Override
    public MESResult list(int page, int limit, CalUser calUser) {
        PageHelper.startPage(page,limit);
        List<CalUser> list = calUserMapper.list(calUser);
        PageInfo<CalUser> pageInfo = new PageInfo<>(list);
        return MESResult.ok(pageInfo);
    }
}
